import { useState, useEffect } from 'react'

function useExam(fn) {
    const [list, setList] = useState([])
    useEffect(() => {
        fn().then(res => {
            setList(res.data.data)
        })
    }, [])
    return list
}

export {
    useExam
}